
public class Bicycle {
private int noOfGear;
private double speed;
private String pattern;
private double cost;
private String countryOfOrigin;
private String career;
private static int noOfBicycle=0;
private int id;

//construction of default constructor
public Bicycle(){
	
}

//three parameters constructors
public Bicycle(int noOfGear, double speed,double cost){
	this.noOfGear=noOfGear;
	this.speed=speed;
	this.cost=cost;
	id=++noOfBicycle;
	noOfBicycle=id;
	
}

//four parameters constructors
public Bicycle(String country, int noOfgear, double speed,double cost){
	this.noOfGear=noOfgear;
	this.speed=speed;
	this.cost=cost;
	countryOfOrigin=country;
//	++noOfBicycle;
	id=++noOfBicycle;
	noOfBicycle=id;
}
//methods 
public void gearUp(){
	noOfGear+=1;
}
public void gearDown(int x){
	noOfGear-=x;
}

//apply break
public void applyBreak(){
	speed-=1;
}
public void applyBreak2(){
	speed=speed-0.10*noOfGear*0.10*speed;
}
//get methods
public double getSpeed(){
	return speed;
}

public int getId(){
//	id=noOfBicycle;
	return id;
}

public int getNoOfBicycle(){
	return noOfBicycle;
}

public int getGear(){
	return noOfGear;
}
}
